package com.genius.mobile_page.pandian_jd.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.genius.mobile_page.common.ResponseData;
import com.genius.mobile_page.pandian_jd.service.PandianjdService;
import com.genius.workflow.log.ControllerLog;



@Controller
public class PandianjdController {
	
	private Logger log = LoggerFactory.getLogger(PandianjdController.class);
	@Autowired
    @Qualifier("pandianjdService")
//	@Resource(name="pandianjdService")
	private PandianjdService pandianjdService;
	
    @RequestMapping("/mobile_page/pandian_jd/toIndex")
    public String toIndex(){
        return "/views/mobile_page/pandian_jd/index";
    }
    //跳转到门店首页
    @RequestMapping("/mobile_page/pandian_jd/toShop_index")
    public String toShop_index(){
        return "/views/mobile_page/pandian_jd/shop_index";
    }
    
    @RequestMapping("/mobile_page/pandian_jd/toPandian_item_bitian")
    public String toPandian_item_bitian(){
        return "/views/mobile_page/pandian_jd/pandian_item_bitian";
    }
    
    @RequestMapping("/mobile_page/pandian_jd/toPandian_item_bitian_edit")
    public String toPandian_item_bitian_edit(){
        return "/views/mobile_page/pandian_jd/pandian_item_bitian_edit";
    }
    
    @RequestMapping("/mobile_page/pandian_jd/toPandian_shop_daiban")
    public String toPandian_shop_daiban(){
        return "/views/mobile_page/pandian_jd/pandian_shop_daiban";
    }
    
    @RequestMapping("/mobile_page/pandian_jd/toPandian_shop_daiban_edit")
    public String toPandian_shop_daiban_edit(){
        return "/views/mobile_page/pandian_jd/pandian_shop_daiban_edit";
    }
    
    @RequestMapping("/mobile_page/pandian_jd/toPandian_plan")
    public String toPandian_plan(){
        return "/views/mobile_page/pandian_jd/pandian_plan";
    }
    
    @RequestMapping("/mobile_page/pandian_jd/toPandian_jieguo_biaozhun")
    public String toPandian_jieguo_biaozhun(){
        return "/views/mobile_page/pandian_jd/pandian_jieguo_biaozhun";
    }
    
    @ControllerLog(description="查询门店信息")
	@PostMapping("/mobile_page/pandian_jd/getShopInfo")
    @ResponseBody
    public ResponseData getOrderShop(@RequestBody JSONObject parms){
//		log.info("查询门店信息请求--->"+parms);
		ResponseData resData = pandianjdService.getShopInfo(parms);
//		log.info("查询门店信息返回值--->"+resData);
        return resData;
	}
    @ControllerLog(description="查询盘点计划")
	@PostMapping("/mobile_page/pandian_jd/getPandianPlan")
    @ResponseBody
    public ResponseData getPandianPlan(@RequestBody JSONObject parms){
//		log.info("查询盘点计划请求--->"+parms);
		ResponseData resData = pandianjdService.getPandianPlan(parms);
//		log.info("查询盘点计划返回值--->"+resData);
        return resData;
	}
    @ControllerLog(description="新增盘点计划")
	@PostMapping("/mobile_page/pandian_jd/insertPandianPlan")
    @ResponseBody
    public ResponseData insertPandianPlan(@RequestBody JSONObject parms, HttpSession session){
//		log.info("新增盘点计划请求--->"+parms);
		ResponseData resData = pandianjdService.insertPandianPlan(parms, session);
//		log.info("新增盘点计划返回值--->"+resData);
        return resData;
	}
    @ControllerLog(description="编辑盘点计划")
	@PostMapping("/mobile_page/pandian_jd/editPandianPlan")
    @ResponseBody
    public ResponseData editPandianPlan(@RequestBody JSONObject parms, HttpSession session){
//		log.info("编辑盘点计划请求--->"+parms);
		ResponseData resData = pandianjdService.editPandianPlan(parms, session);
//		log.info("编辑盘点计划返回值--->"+resData);
        return resData;
	}
    @ControllerLog(description="删除盘点计划")
	@PostMapping("/mobile_page/pandian_jd/deletePandianPlan")
    @ResponseBody
    public ResponseData deletePandianPlan(@RequestBody JSONObject parms){
//		log.info("删除盘点计划请求--->"+parms);
		ResponseData resData = pandianjdService.deletePandianPlan(parms);
//		log.info("删除盘点计划返回值--->"+resData);
        return resData;
	}
    @ControllerLog(description="查询盘点必填项")
   	@PostMapping("/mobile_page/pandian_jd/getPandianBitian")
       @ResponseBody
       public ResponseData getPandianBitian(@RequestBody JSONObject parms){
//   		log.info("查询盘点必填项请求--->"+parms);
   		ResponseData resData = pandianjdService.getPandianBitian(parms);
//   		log.info("查询盘点必填项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="新增盘点必填项")
   	@PostMapping("/mobile_page/pandian_jd/insertPandianBitian")
       @ResponseBody
       public ResponseData insertPandianBitian(@RequestBody JSONObject parms, HttpSession session){
//   		log.info("新增盘点必填项请求--->"+parms);
   		ResponseData resData = pandianjdService.insertPandianBitian(parms, session);
//   		log.info("新增盘点必填项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="编辑盘点必填项")
   	@PostMapping("/mobile_page/pandian_jd/editPandianBitian")
       @ResponseBody
       public ResponseData editPandianBitian(@RequestBody JSONObject parms, HttpSession session){
//   		log.info("编辑盘点必填项请求--->"+parms);
   		ResponseData resData = pandianjdService.editPandianBitian(parms, session);
//   		log.info("编辑盘点必填项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="删除盘点必填项")
   	@PostMapping("/mobile_page/pandian_jd/deletePandianBitian")
       @ResponseBody
       public ResponseData deletePandianBitian(@RequestBody JSONObject parms){
//   		log.info("删除盘点必填项请求--->"+parms);
   		ResponseData resData = pandianjdService.deletePandianBitian(parms);
//   		log.info("删除盘点必填项返回值--->"+resData);
           return resData;
   	}
    @ControllerLog(description="查询盘点门店待办事项")
   	@PostMapping("/mobile_page/pandian_jd/getPandianShopDaiban")
    @ResponseBody
       public ResponseData getPandianShopDaiban(@RequestBody JSONObject parms){
//   		log.info("查询盘点门店待办事项请求--->"+parms);
   		ResponseData resData = pandianjdService.getPandianShopDaiban(parms);
//   		log.info("查询盘点门店待办事项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="新增盘点门店待办事项")
   	@PostMapping("/mobile_page/pandian_jd/insertPandianShopDaiban")
       @ResponseBody
       public ResponseData insertPandianShopDaiban(@RequestBody JSONObject parms, HttpSession session){
//   		log.info("新增盘点门店待办事项请求--->"+parms);
   		ResponseData resData = pandianjdService.insertPandianShopDaiban(parms, session);
//   		log.info("新增盘点门店待办事项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="编辑盘点门店待办事项")
   	@PostMapping("/mobile_page/pandian_jd/editPandianShopDaiban")
       @ResponseBody
       public ResponseData editPandianShopDaiban(@RequestBody JSONObject parms, HttpSession session){
//   		log.info("编辑盘点门店待办事项请求--->"+parms);
   		ResponseData resData = pandianjdService.editPandianShopDaiban(parms, session);
//   		log.info("编辑盘点门店待办事项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="删除盘点门店待办事项")
   	@PostMapping("/mobile_page/pandian_jd/deletePandianShopDaiban")
       @ResponseBody
       public ResponseData deletePandianShopDaiban(@RequestBody JSONObject parms){
//   		log.info("删除盘点门店待办事项请求--->"+parms);
   		ResponseData resData = pandianjdService.deletePandianShopDaiban(parms);
//   		log.info("删除盘点门店待办事项返回值--->"+resData);
           return resData;
   	}
       @ControllerLog(description="查询盘点结果标准")
      	@PostMapping("/mobile_page/pandian_jd/getPandianJieguoBiaozhun")
       @ResponseBody
          public ResponseData getPandianJieguoBiaozhun(@RequestBody JSONObject parms){
//      		log.info("查询盘点结果标准请求--->"+parms);
      		ResponseData resData = pandianjdService.getPandianJieguoBiaozhun(parms);
//      		log.info("查询盘点结果标准返回值--->"+resData);
              return resData;
      	}
          @ControllerLog(description="新增盘点结果标准")
      	@PostMapping("/mobile_page/pandian_jd/insertPandianJieguoBiaozhun")
          @ResponseBody
          public ResponseData insertPandianJieguoBiaozhun(@RequestBody JSONObject parms, HttpSession session){
//      		log.info("新增盘点结果标准请求--->"+parms);
      		ResponseData resData = pandianjdService.insertPandianJieguoBiaozhun(parms, session);
//      		log.info("新增盘点结果标准返回值--->"+resData);
              return resData;
      	}
          @ControllerLog(description="编辑盘点结果标准")
      	@PostMapping("/mobile_page/pandian_jd/editPandianJieguoBiaozhun")
          @ResponseBody
          public ResponseData editPandianJieguoBiaozhun(@RequestBody JSONObject parms, HttpSession session){
//      		log.info("编辑盘点结果标准请求--->"+parms);
      		ResponseData resData = pandianjdService.editPandianJieguoBiaozhun(parms, session);
//      		log.info("编辑盘点结果标准返回值--->"+resData);
              return resData;
      	}
          @ControllerLog(description="删除盘点结果标准")
      	@PostMapping("/mobile_page/pandian_jd/deletePandianJieguoBiaozhun")
          @ResponseBody
          public ResponseData deletePandianJieguoBiaozhun(@RequestBody JSONObject parms){
//      		log.info("删除盘点结果标准请求--->"+parms);
      		ResponseData resData = pandianjdService.deletePandianJieguoBiaozhun(parms);
//      		log.info("删除盘点结果标准返回值--->"+resData);
              return resData;
      	}
}

